Integrand size = 23, antiderivative size = 198 \[ \int (d \tan (e+f x))^n (a+b \tan (e+f x))^3 \, dx=\frac {a b^2 (5+2 n) (d \tan (e+f x))^{1+n}}{d f (1+n) (2+n)}+\frac {a \left (a^2-3 b^2\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1+n}{2},\frac {3+n}{2},-\tan ^2(e+f x)\right ) (d \tan (e+f x))^{1+n}}{d f (1+n)}+\frac {b \left (3 a^2-b^2\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {2+n}{2},\frac {4+n}{2},-\tan ^2(e+f x)\right ) (d \tan (e+f x))^{2+n}}{d^2 f (2+n)}+\frac {b^2 (d \tan (e+f x))^{1+n} (a+b \tan (e+f x))}{d f (2+n)} \]
[Out]
Time = 0.34 (sec) , antiderivative size = 198, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3647, 3711, 3619, 3557, 371} \[ \int (d \tan (e+f x))^n (a+b \tan (e+f x))^3 \, dx=\frac {b \left (3 a^2-b^2\right ) (d \tan (e+f x))^{n+2} \operatorname {Hypergeometric2F1}\left (1,\frac {n+2}{2},\frac {n+4}{2},-\tan ^2(e+f x)\right )}{d^2 f (n+2)}+\frac {a \left (a^2-3 b^2\right ) (d \tan (e+f x))^{n+1} \operatorname {Hypergeometric2F1}\left (1,\frac {n+1}{2},\frac {n+3}{2},-\tan ^2(e+f x)\right )}{d f (n+1)}+\frac {a b^2 (2 n+5) (d \tan (e+f x))^{n+1}}{d f (n+1) (n+2)}+\frac {b^2 (a+b \tan (e+f x)) (d \tan (e+f x))^{n+1}}{d f (n+2)} \]
[In]
[Out]
Rule 371
Rule 3557
Rule 3619
Rule 3647
Rule 3711
Rubi steps \begin{align*} \text {integral}& = \frac {b^2 (d \tan (e+f x))^{1+n} (a+b \tan (e+f x))}{d f (2+n)}+\frac {\int (d \tan (e+f x))^n \left (-a d \left (b^2 (1+n)-a^2 (2+n)\right )+b \left (3 a^2-b^2\right ) d (2+n) \tan (e+f x)+a b^2 d (5+2 n) \tan ^2(e+f x)\right ) \, dx}{d (2+n)} \\ & = \frac {a b^2 (5+2 n) (d \tan (e+f x))^{1+n}}{d f (1+n) (2+n)}+\frac {b^2 (d \tan (e+f x))^{1+n} (a+b \tan (e+f x))}{d f (2+n)}+\frac {\int (d \tan (e+f x))^n \left (a \left (a^2-3 b^2\right ) d (2+n)+b \left (3 a^2-b^2\right ) d (2+n) \tan (e+f x)\right ) \, dx}{d (2+n)} \\ & = \frac {a b^2 (5+2 n) (d \tan (e+f x))^{1+n}}{d f (1+n) (2+n)}+\frac {b^2 (d \tan (e+f x))^{1+n} (a+b \tan (e+f x))}{d f (2+n)}+\left (a \left (a^2-3 b^2\right )\right ) \int (d \tan (e+f x))^n \, dx+\frac {\left (b \left (3 a^2-b^2\right )\right ) \int (d \tan (e+f x))^{1+n} \, dx}{d} \\ & = \frac {a b^2 (5+2 n) (d \tan (e+f x))^{1+n}}{d f (1+n) (2+n)}+\frac {b^2 (d \tan (e+f x))^{1+n} (a+b \tan (e+f x))}{d f (2+n)}+\frac {\left (b \left (3 a^2-b^2\right )\right ) \text {Subst}\left (\int \frac {x^{1+n}}{d^2+x^2} \, dx,x,d \tan (e+f x)\right )}{f}+\frac {\left (a \left (a^2-3 b^2\right ) d\right ) \text {Subst}\left (\int \frac {x^n}{d^2+x^2} \, dx,x,d \tan (e+f x)\right )}{f} \\ & = \frac {a b^2 (5+2 n) (d \tan (e+f x))^{1+n}}{d f (1+n) (2+n)}+\frac {a \left (a^2-3 b^2\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1+n}{2},\frac {3+n}{2},-\tan ^2(e+f x)\right ) (d \tan (e+f x))^{1+n}}{d f (1+n)}+\frac {b \left (3 a^2-b^2\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {2+n}{2},\frac {4+n}{2},-\tan ^2(e+f x)\right ) (d \tan (e+f x))^{2+n}}{d^2 f (2+n)}+\frac {b^2 (d \tan (e+f x))^{1+n} (a+b \tan (e+f x))}{d f (2+n)} \\ \end{align*}
Time = 0.85 (sec) , antiderivative size = 141, normalized size of antiderivative = 0.71 \[ \int (d \tan (e+f x))^n (a+b \tan (e+f x))^3 \, dx=\frac {\tan (e+f x) (d \tan (e+f x))^n \left (a \left (a^2-3 b^2\right ) (2+n) \operatorname {Hypergeometric2F1}\left (1,\frac {1+n}{2},\frac {3+n}{2},-\tan ^2(e+f x)\right )+b \left (\left (3 a^2-b^2\right ) (1+n) \operatorname {Hypergeometric2F1}\left (1,\frac {2+n}{2},\frac {4+n}{2},-\tan ^2(e+f x)\right ) \tan (e+f x)+b (3 a (2+n)+b (1+n) \tan (e+f x))\right )\right )}{f (1+n) (2+n)} \]
[In]
[Out]
\[\int \left (d \tan \left (f x +e \right )\right )^{n} \left (a +b \tan \left (f x +e \right )\right )^{3}d x\]
[In]
[Out]
\[ \int (d \tan (e+f x))^n (a+b \tan (e+f x))^3 \, dx=\int { {\left (b \tan \left (f x + e\right ) + a\right )}^{3} \left (d \tan \left (f x + e\right )\right )^{n} \,d x } \]
[In]
[Out]
\[ \int (d \tan (e+f x))^n (a+b \tan (e+f x))^3 \, dx=\int \left (d \tan {\left (e + f x \right )}\right )^{n} \left (a + b \tan {\left (e + f x \right )}\right )^{3}\, dx \]
[In]
[Out]
\[ \int (d \tan (e+f x))^n (a+b \tan (e+f x))^3 \, dx=\int { {\left (b \tan \left (f x + e\right ) + a\right )}^{3} \left (d \tan \left (f x + e\right )\right )^{n} \,d x } \]
[In]
[Out]
\[ \int (d \tan (e+f x))^n (a+b \tan (e+f x))^3 \, dx=\int { {\left (b \tan \left (f x + e\right ) + a\right )}^{3} \left (d \tan \left (f x + e\right )\right )^{n} \,d x } \]
[In]
[Out]
Timed out. \[ \int (d \tan (e+f x))^n (a+b \tan (e+f x))^3 \, dx=\int {\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^n\,{\left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )}^3 \,d x \]
[In]
[Out]